# -*- coding: utf-8 -*-
import json
import os

with open('../data.json') as data:
    data_list = json.load(data)
    for i in data_list:
        line = "标题:"+i['title']+"\n简介:"+i['intro'][0].strip()+"\n"+i['time'][0].strip().replace(' ','').replace('\r\n',' ')
        file = open('../text.txt','a')
        file.write(line+'\n')
        file.write("-----------------------------------------------------------------------------------------------\n")
        file.close()